package cn.zwz.bill.entity;

import cn.zwz.basics.baseClass.ZwzBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "t_stock")
@TableName("t_stock")
@ApiModel(value = "库存")
public class Stock extends ZwzBaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "供应商ID")
    private String supplierId;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "供应商名")
    private String supplierName;

    @ApiModelProperty(value = "总金额")
    private String totalAmount;

    @ApiModelProperty(value = "实付金额")
    private String paidAmount;

    @ApiModelProperty(value = "状态（入库出库）")
    private String state;

    @ApiModelProperty(value = "负责员工Id")
    private String userId;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "负责员工姓名")
    private String userName;

    @ApiModelProperty(value = "订单时间")
    private String dateTime;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "负责员工姓名")
    private List<Commodity> commodityList;

}
